<?php foreach($query->result() as $row) { ?>
<?php 
echo form_open('todos/save') 
?> 
<ul>
<input type="hidden" value="<?=$row->todo?>" name="todo" />
<li><label>Title/description</label><input type="text" value="<?=$row->description?>" name="description" /></li>
<li><label>To be completed by</label><input type="text" id="date" value="<?=$row->bydate?>" name="bydate" /></li>
<li><label>Assigned to</label><select name="user">
<?php foreach($user->result() as $row) { ?>
<option value="<?=$row->id?>"><?=$row->fname?></option>
<?php } ?>
</select>
</li>
<li><input type="submit" class="submit" value="Edit" /></li>
</ul>
</form>
<?php } ?>